package com.mega;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;

public class Login {
public WebDriver driver;
@Before
public void start()throws Exception
{
WebDriver driver= new FirefoxDriver();
driver.get("http://insofthr.trial.orangehrmlive.com/");
	 driver.manage().window().maximize(); 
 }
 
 
	@Test
	public void test() {
	WebElement element= driver.findElement(By.id("txtUsername"));
   element.sendKeys("Admin");
	driver.findElement(By.id("txtPassword")).sendKeys("BVi1iaVl");
	driver.findElement(By.xpath("//*[@id='btnLogin']")).click();
	 //assert.assertequals("Enter Username and Password and Welcome Orangehrm to retry login.",driver.findElement(By.xpath("//form[@id=frmretryLogin/fieldset/u1/li")).getText());
	}
	@After
	public void stop(){
		driver.quit();
	}
}

